#ifndef PAINTER_H
#define PAINTER_H
#include<QWidget>
#include "image.h"


class Painter : public QWidget
{
public:
    explicit Painter(QWidget *parent = nullptr);

    void MousePress(QMouseEvent *event);
    void MouseMove(QMouseEvent *event);
    void MouseRelease(QMouseEvent *event);
    void PaintLine(Image* img );
    void SetR(int range=1);
    void SetRGB(int r=0,int g=0,int b=0);
    void Clear();

private:
    std::vector<std::vector<QPoint>> lines;
    Image* img;
    int paint_r;
    RGB* rgb;
//signals:
//    void Changed();

};

#endif // PAINTER_H
